package com.pan.utils;

import java.awt.*;

public class RandomColor {

    public static final Color C_0 = new Color(200, 200, 200);
    public static final Color C_1 = new Color(200, 0, 0);
    public static final Color C_2 = new Color(0, 200, 0);
    public static final Color C_3 = new Color(0, 0, 200);
    public static final Color C_4 = new Color(250, 150, 0);
    public static final Color C_5 = new Color(255, 0, 255);
    public static final Color C_6 = new Color(0, 200, 200);

    public static Color getBackgroundColor(){
        return RandomColor.C_0;
    }
    public static Color getR3Color(){
        int r = (int) (Math.random() * 3);
        Color color;
        if (r == 0) {
            color = RandomColor.C_1;
            return color;
        } else if (r == 1) {
            color = RandomColor.C_2;
            return color;
        } else {
            color = RandomColor.C_3;
            return color;
        }
    }


    public static Color getR6Color(){
        if (Math.random()<0.5) {
            return getR3Color();
        }
        int r = (int) (Math.random() * 3);
        Color color;
        if (r == 0) {
            color = RandomColor.C_4;
            return color;
        } else if (r == 1) {
            color = RandomColor.C_5;
            return color;
        } else {
            color = RandomColor.C_6;
            return color;
        }
    }

}
